package cn.tedu.apiday03;

import java.io.File;
import java.util.Scanner;

//递归删除文件夹
public class SizeAction1 {
    public static void main(String[] args) {
        String string = new Scanner(System.in).nextLine();
        File fs = new File(string);
        delete(fs);
    }

    private static void delete(File fs) {
        File[] files = fs.listFiles();
        for (int i = 0; i < files.length; i++) {
            if (files[i].isFile()) {
                files[i].delete();
            } else if (files[i].isDirectory()){
                delete(files[i]);
                files[i].delete();




            }
        }
        fs.delete();


    }
}
